c<template>
  <div>
      <button  v-for="btn2 in btnlist" :key='btn2' @click="changeBtn(btn2)" :class="{checked:btn2 === todobt}">{{btn2}}</button>
  </div>
</template>

<script>
export default {
  props: {
    todobt: String
  },
  data () {
    return {
      btnlist: ['all', 'finish', 'unfinish']
    }
  },
  mounted () {
    console.log(this.todobt, 'todobt')
  },
  methods: {
    changeBtn (btn2) {
      this.$emit('changeBtnState', btn2)
    }
  }
}
</script>

<style>
  .checked{
    background-color: aqua;
  }
</style>
